<?php

    class limitclass
    {
        public $login;
        public $speciality;
        public $post;
        public $date;
        public $limit;
        public function __construct($login, $speciality, $post, $date, $limit)
        {
            $this->post = $post;
            $this->date = $date;
            $this->limit = $limit;
            $this->login = $login;
            $this->speciality = $speciality;
        }
    }

    $limits = Array(); // of limitclass()
    $limitsfile = str_replace("\\", "/", dirname(__FILE__)."/admin/limits.sys");
    $limitsbuffer = file_get_contents($limitsfile);
    $limitsbuffer = str_replace("\r\n", "", $limitsbuffer);
    $limitsbuffer = str_replace("\n", "", $limitsbuffer);
    $tp = explode(";", $limitsbuffer);
    for($i=0; $i<count($tp); $i++)
    foreach($tp as $limitline)
    {
        $pos = strpos($limitline, ",");
        if($pos !== false)
        {
            $tp = explode(',', $limitline);
            $tlogin = trim($tp[0]);
            $tspeciality = trim($tp[1]);
            $tpost = trim($tp[2]);
            $tdate = trim($tp[3]);
            $tlimitcount = (int)trim($tp[4]);
            $limits[] = new limitclass($tlogin, $tspeciality, $tpost, $tdate, $tlimitcount);
        }
    }

?>